<template>
  <main class="orientation">
    <c-navigation>
      <c-time @change="timeChangeHandler"/>
    </c-navigation>
    <orientation-chart :depCode.sync="depCode"/>
    <orientation-table/>
  </main>
</template>

<script lang="ts">
import orientationChart from "./components/orientationChart.vue";
import orientationTable from "./components/orientationTable.vue";

export default {
  name: "orientation",
  components: {orientationChart, orientationTable},
  provide() {
    return {
      timeParamsFormParent: this.timeParams,
      getTimeParamsFormParent: () => this.timeParams,
      depCodeFormParent: this.depCode,
      getDepCodeFormParent: () => this.depCode,
    }
  },
  data() {
    return {
      timeParams: {},
      depCode: ""
    }
  },
  methods: {
    timeChangeHandler(e) {
      this.timeParams = e;
    }
  }
}
</script>

<style scoped lang="stylus">

</style>
